|
Расположение в меню |
---|
Черчение -> Перемещение |
Верстаки |
Draft, Arch |
Быстрые клавиши |
M V |
Представлено в версии |
- |
См. также |
Нет |
The Draft Move command moves or copies selected objects from one point to another. In subelement mode the command moves selected points and edges, or copies selected edges, of Draft Lines and Draft Wires.
The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or BIM Workbench.
Moving an object from one point to another
See also: Draft Snap and Draft Constrain.
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 1.0).
See also: Preferences Editor and Draft Preferences.
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To move objects use the move
method of the Draft module.
moved_list = move(objectslist, vector, copy=False)
objectslist
contains the objects to be moved. It is either a single object or a list of objects.vector
is the displacement.copy
is True
copies are created instead of moving the original objects.moved_list
is returned with the original moved objects, or with the new copies. It is either a single object or a list of objects, depending on objectslist
.Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
polygon1 = Draft.make_polygon(5, radius=1000)
polygon2 = Draft.make_polygon(3, radius=500)
polygon3 = Draft.make_polygon(6, radius=220)
Draft.move(polygon1, App.Vector(500, 500, 0))
Draft.move(polygon1, App.Vector(500, 500, 0))
Draft.move(polygon2, App.Vector(1000, -1000, 0))
Draft.move(polygon3, App.Vector(-500, -500, 0))
list1 = [polygon1, polygon2, polygon3]
vector = App.Vector(-2000, -2000, 0)
list2 = Draft.move(list1, vector, copy=True)
list3 = Draft.move(list1, -2*vector, copy=True)
doc.recompute()